<template>
	<view class="main">
		<quick-button></quick-button>
		<!-- 头部步骤条 -->
		<view class="header">
			<u-steps class="steps" inactiveColor="#f3f3f3" activeColor="#fff" :current="steps">
				<u-steps-item title="选择机构" activeColor="#fff" :current="steps">
					<!-- <text
						:class="{ slots: noActive, 'slots-activited': isActive }"
						slot="icon">
						<text v-if="issuccess">2</text>
						<icon v-else class="tepsicon" type="success_no_circle" color="#00bcb2" size="14"/>
					</text> -->
					<text :class="steps == 0 ? 'slot-icon slot-acticed' : 'slot-icon'" slot="icon">1</text>
					<!-- <text>2</text> -->
				</u-steps-item>
				<u-steps-item title="填写申请表">
					<text :class="steps == 1 ? 'slot-icon slot-acticed' : 'slot-icon'" slot="icon">2</text>
				</u-steps-item>

				<u-steps-item title="等待审核结果" activeColor="#fff">
					<!-- <text
						:class="{ slots: noActiveTwo, 'slots-activited': isActiveTwo }"
						slot="icon">
						<text>3</text>
					</text> -->
					<!-- <text>3</text> -->
					<text :class="steps == 2 ? 'slot-icon slot-acticed' : 'slot-icon'" slot="icon">3</text>
				</u-steps-item>
			</u-steps>
		</view>
		<!-- 主体内容 -->
		<!-- 填写申请表 -->
		<view v-show="steps === 1" class="body">
			<u--form labelPosition="left" :model="model1" :rules="rules" ref="formdata">
				<!-- 是否是医院转出 -->
				<u-form-item label="是否是医院转出" prop="userInfo.hospitalRollOut" borderBottom
					@click="showHospitalRollout = true" ref="item1">
					<u--input v-model="model1.userInfo.hospitalRollOut" disabled disabledColor="#ffffff"
						inputAlign="right" placeholder="请选择" border="none"></u--input>
					<u-icon slot="right" name="arrow-right"></u-icon>
				</u-form-item>
				<!-- 医院名称 -->
				<u-form-item v-if="showIfHospitalView" label="医院名称" borderBottom ref="item1"
					@click="showHospitalNameSheetView">
					<u--input v-model="caseTableForm.agencyName" disabled disabledColor="#ffffff" inputAlign="right"
						placeholder="请选择医院名称" border="none"></u--input>
					<u-icon slot="right" name="arrow-right"></u-icon>
				</u-form-item>

				<!-- 住院编号 -->
				<u-form-item v-if="showIfHospitalView" label="住院编号" borderBottom ref="item1">
					<u--input v-model="caseTableForm.zyh" inputAlign="right" placeholder="请输入住院编号" border="none"
						@blur="caseTableDataOpen"></u--input>
				</u-form-item>
				<!-- 患者姓名 -->
				<u-form-item label="患者姓名" prop="userInfo.patientName" borderBottom ref="item1">
					<u--input v-model="model1.userInfo.patientName" inputAlign="right" placeholder="请输入患者姓名"
						border="none"></u--input>
				</u-form-item>

				<!-- 性别 -->
				<u-form-item label="性别" prop="userInfo.patientGender" borderBottom @click="showSex = true" ref="item1">
					<u--input v-model="model1.userInfo.patientGender" disabled disabledColor="#ffffff"
						inputAlign="right" placeholder="请选择性别" border="none"></u--input>
					<u-icon slot="right" name="arrow-right"></u-icon>
				</u-form-item>

				<!-- 年龄 -->
				<u-form-item @click="showDate = true" label="年龄" prop="userInfo.patientAge" borderBottom ref="item1">
					<u--input v-model="model1.userInfo.patientAge" inputAlign="right" placeholder="请输入年龄" border="none"
						disabledColor="#ffffff" disabled type="number"></u--input>
				</u-form-item>

				<!-- 参保情况 -->
				<u-form-item label="参保情况" prop="userInfo.participationStatus" borderBottom
					@click="showParticipationStatus = true" ref="item1">
					<u--input v-model="model1.userInfo.participationStatus" disabled disabledColor="#ffffff"
						inputAlign="right" placeholder="请选择参保情况" border="none"></u--input>
					<u-icon slot="right" name="arrow-right"></u-icon>
				</u-form-item>

				<!-- 医保类型 -->
				<u-form-item label="医保类型" v-if="model1.userInfo.participationStatus == '参保'" @click="yibaoshow = true"
					borderBottom ref="item1">
					<u--input v-model="model1.userInfo.medicalNumber" disabled disabledColor="#ffffff"
						inputAlign="right" placeholder="请选择" border="none"></u--input>
				</u-form-item>

				<!-- 身份证号 -->
				<u-form-item label="身份证号" prop="userInfo.idCradNumber" borderBottom ref="item1">
					<u--input v-model="model1.userInfo.idCradNumber" inputAlign="right" placeholder="请输入身份证号"
						type="idcard" border="none"></u--input>
				</u-form-item>

				<!-- 联系人 -->
				<u-form-item label="联系人" prop="userInfo.personName" borderBottom ref="item1">
					<u--input v-model="model1.userInfo.personName" inputAlign="right" placeholder="请输入联系人姓名"
						border="none"></u--input>
				</u-form-item>

				<!-- 联系人电话 -->
				<u-form-item label="联系电话" prop="userInfo.personPhone" borderBottom ref="item1">
					<u--input v-model="model1.userInfo.personPhone" inputAlign="right" type="number"
						placeholder="请输入联系电话" border="none"></u--input>
				</u-form-item>

				<!-- 家庭住址 -->
				<u-form-item label="家庭住址" prop="userInfo.address" borderBottom ref="item1">
					<picker mode="region" @change="addressfn">
						<u--input v-model="model1.userInfo.address" inputAlign="right" placeholder="请选择" disabled
							disabledColor="#ffffff" border="none"></u--input>
					</picker>
				</u-form-item>

				<!-- 详细地址 -->
				<u-form-item label="详细地址" prop="userInfo.homeAddress" borderBottom ref="item1">
					<u--input v-model="model1.userInfo.homeAddress" inputAlign="right" placeholder="请输入家庭详细地址"
						border="none"></u--input>
				</u-form-item>

				<!-- 个人身份 -->
				<!-- 	<u-form-item
					label="个人身份"
					prop="userInfo.identity"
					borderBottom
					@click="
						showPersonalIdentity = true
					"
					ref="item1"
				>
					<u--input
						v-model="model1.userInfo.identity"
						disabled
						disabledColor="#ffffff"
						inputAlign="right"
						placeholder="请选择"
						border="none"
					></u--input>
					<u-icon slot="right" name="arrow-right"></u-icon>
				</u-form-item> -->

				<!-- 转出医院及科室 -->
				<u-form-item v-if="showView" label="* 转出医院及科室" borderBottom
					@click="showrolloutHospitalDepartment = true" ref="item1">
					<!-- <u--input
						v-model="model1.userInfo.rolloutHospitalDepartment"
						disabled
						disabledColor="#ffffff"
						inputAlign="right"
						placeholder="请选择"
						border="none"
					></u--input>
					<u-icon slot="right" name="arrow-right"></u-icon> -->
					<uni-data-picker placeholder="请选择医院及科室" popup-title="请选择" :localdata="dataTree" v-model="classes"
						@change="pickerclear" @nodeclick="onnodeclick" @popupopened="onpopupopened"
						@popupclosed="onpopuplosed"></uni-data-picker>
				</u-form-item>

				<!-- 病情描述 -->
				<u-form-item class="Description" v-if="showView" prop="userInfo.depict" borderBottom ref="item1">
					<text>病情描述</text>
					<u--textarea v-model="model1.userInfo.bedHospitalVo.depict" inputAlign="left" placeholder="请输入病情描述"
						border="none"></u--textarea>
				</u-form-item>

				<!-- 诊断结果 -->
				<u-form-item class="diagnosticResults" v-if="showView" prop="userInfo.result" borderBottom ref="item1">
					<text>诊断结果</text>
					<u--textarea v-model="model1.userInfo.bedHospitalVo.result" inputAlign="left" placeholder="请输入诊断结果"
						border="none"></u--textarea>
				</u-form-item>

				<!-- 医嘱 -->
				<u-form-item class="doctorsAdvice" v-if="showView" prop="userInfo.medicalAdvice" borderBottom
					ref="item1">
					<text>医嘱</text>
					<u--textarea v-model="model1.userInfo.bedHospitalVo.medicalAdvice" inputAlign="left"
						placeholder="请输入医嘱" border="none"></u--textarea>
				</u-form-item>

				<!-- 医保首页照片 -->
				<u-form-item v-if="showView" class="homePage" borderBottom ref="item1">
					<text>医保首页照片</text>
					<u-upload :fileList="fileListhomePage" @afterRead="afterRead1" @delete="deletePic1" multiple
						name="6" :maxCount="1">
						<image src="../../../static/evaluate/uploadpic@2x.png" mode="widthFix"
							style="width: 212rpx; height: 212rpx; margin-top: 16rpx"></image>
					</u-upload>
				</u-form-item>

				<!-- 病历照片 -->
				<u-form-item v-if="showView" class="medicalRecord" borderBottom ref="item1">
					<text>病历照片</text>
					<u-upload :fileList="fileListmedicalRecord" @afterRead="afterRead2" @delete="deletePic2" multiple
						name="6" :maxCount="2">
						<image src="../../../static/evaluate/uploadpic@2x.png" mode="widthFix"
							style="width: 212rpx; height: 212rpx"></image>
					</u-upload>
				</u-form-item>

				<!-- 申请人 -->
				<!-- <u-form-item label="申请人" prop="userInfo.applyName" borderBottom ref="item1">
					<u--input
						v-model="model1.userInfo.applyName"
						inputAlign="right"
						placeholder="请输入申请人"
						border="none"
					></u--input>
				</u-form-item> -->

				<!-- 申请人与患者关系 -->
				<!-- <u-form-item
					label="申请人与患者关系"
					prop="userInfo.relation"
					borderBottom
					@click="
						showRelationship = true
					"
					ref="item1"
				>
					<u--input
						v-model="model1.userInfo.relation"
						disabled
						disabledColor="#ffffff"
						inputAlign="right"
						placeholder="请选择"
						border="none"
					></u--input>
					<u-icon slot="right" name="arrow-right"></u-icon>
				</u-form-item> -->

				<!-- 申请日期 -->
				<!-- <u-form-item
					label="申请日期"
					prop="userInfo.applyDate"
					borderBottom
					ref="item1"
				>
				<picker mode="date" @change="bindDateChange">
					<u--input
						v-model="model1.userInfo.applyDate"
						disabled
						disabledColor="#ffffff"
						inputAlign="right"
						placeholder="请选择"
						border="none"
					></u--input>
					</picker>
					<u-icon slot="right" name="arrow-right"></u-icon>

				</u-form-item> -->
			</u--form>

			<!-- 选择性别 -->
			<u-action-sheet :show="showSex" :actions="actions" @close="showSex = false"
				@select="sexSelect"></u-action-sheet>
			<!-- 选择参保情况 -->
			<u-action-sheet :show="showParticipationStatus" :actions="actionsParticipationStatus"
				@close="showParticipationStatus = false" @select="participationStatusSelect"></u-action-sheet>
			<!-- 个人身份 -->
			<u-action-sheet :show="showPersonalIdentity" :actions="actionsIdentitynNumber"
				@close="showPersonalIdentity = false" @select="personalIdentitySelect"></u-action-sheet>
			<!-- 是否是医院转出 -->
			<u-action-sheet :show="showHospitalRollout" :actions="isHospitalRollout"
				@close="showHospitalRollout = false" @select="ifHospitalSelect"></u-action-sheet>
			<!-- 转出医院及科室 -->
			<!-- <u-action-sheet
				:show="showrolloutHospitalDepartment"
				:actions="rolloutHospitalDepartment"
				@close="showrolloutHospitalDepartment = false"
				@select="rolloutHospitalDepartmentSelect"
			></u-action-sheet> -->
			<!-- 参保情况 -->
			<u-action-sheet :show="yibaoshow" :actions="yibaoList" @close="yibaoshow = false"
				@select="yibaoSelect"></u-action-sheet>
			<!-- 申请人与患者关系 -->
			<u-action-sheet :show="showRelationship" :actions="actionsRelationship" @close="showRelationship = false"
				@select="relationshipSelect"></u-action-sheet>
			<!-- 医院名称 -->
			<u-action-sheet :show="showHospitalNameSheet" :actions="hospitalNameList"
				@close="showHospitalNameSheet = false" @select="hospitalNameSelect"></u-action-sheet>
			<!-- 病历表弹窗    -->
			<u-popup :show="showCaseTable" mode="bottom" :round="10" @open="caseTableDataOpen">
				<view class="case-table-view">
					<view class="case-table-title">病历表</view>
					<view class="case-table-body">
						<u--form labelPosition="left" :labelWidth="140">
							<!-- 医院名称 -->
							<u-form-item label="医院名称" borderBottom>
								<u--input v-model="caseTableData.hospitalName" readonly inputAlign="right"
									border="none"></u--input>
							</u-form-item>
							<!-- 科室 -->
							<u-form-item label="科室" borderBottom>
								<u--input v-model="caseTableData.deptName" readonly inputAlign="right"
									border="none"></u--input>
							</u-form-item>
							<!-- 主治医生 -->
							<u-form-item label="主治医生" borderBottom>
								<u--input v-model="caseTableData.patAtdpscnName" readonly inputAlign="right"
									border="none"></u--input>
							</u-form-item>
							<!-- 病情摘要 -->
							<u-form-item label="病情摘要" borderBottom>
								<u--input v-model="caseTableData.dzContent" readonly inputAlign="right"
									border="none"></u--input>
							</u-form-item>
							<!-- 诊断 -->
							<u-form-item label="诊断" borderBottom>
								<u--input v-model="caseTableData.dzsimType" readonly inputAlign="right"
									border="none"></u--input>
							</u-form-item>
							<!-- 收治指征和建床意见 -->
							<u-form-item label="收治指征和建床意见" borderBottom>
								<u--input v-model="caseTableData.bedBuildingOpinions" readonly inputAlign="right"
									border="none"></u--input>
							</u-form-item>
							<u-form-item label="病历照片" borderBottom labelPosition="top">
								<u--image :showLoading="true" :src="src" width="80px" height="80px"
									v-for="src in caseTableData.picList"></u--image>
							</u-form-item>
						</u--form>
					</view>
					<view class="case-table-footer">
						<button class="footerbtn" @click="caseTableDataClose">下一步</button>
					</view>
				</view>
			</u-popup>
		</view>
		<!-- 选择机构 -->
		<view v-show="steps === 0" class="body-mechanism">
			<view style="position: relative; height: 150rpx">
				<u-search @clear="search" @search="search" @custom="search" v-model="searchWord" :showAction="true"
					actionText="搜索"></u-search>
				<uni-data-picker style="position: absolute; top: 90rpx; left: -200rpx" placeholder="请选择区域"
					:localdata="regionList" v-model="region" :map="map" @change="search"></uni-data-picker>
			</view>

			<view class="body-content">
				<view class="body-content-items" v-for="(item, index) in list" :key="index">
					<!-- 单选标识按钮 -->
					<view class="item-left" @click="rediofn(item.agencyId)">
						<image v-if="checked === item.agencyId" style="width: 100%; height: 100%"
							src="../../../static/icon/redioactived.png"></image>
						<image v-else style="width: 100%; height: 100%" src="../../../static/icon/redionull.png">
						</image>
					</view>
					<!-- 内容 -->
					<view class="item-right" @click="institutiondetailsfn(item)">
						<view class="item-right-img">
							<image style="width: 100%; height: 100%; border-radius: 16rpx"
								:src="item.thumbnail | filterUrl"></image>
						</view>
						<view class="item-right-text">
							<view class="item-right-text-title">{{ item.title }}</view>
							<view class="item-right-text-address">
								<span class="addressicon">
									<image style="width: 100%; height: 100%"
										src="../../../static/evaluate/postion@2x.png"></image>
								</span>
								<span class="item-right-text-address-text">{{ item.address }}</span>
							</view>
							<view class="item-right-text-info">{{ item.content }}</view>
						</view>
						<view class="item-right-icon">
							<image style="width: 100%; height: 100%" src="../../../static/evaluate/arrow@2x.png">
							</image>
						</view>
					</view>
				</view>
			</view>
		</view>

		<!-- 等待审核结果 -->
		<view v-if="steps === 2" class="body-result">
			<view class="successicon">
				<image  @click="previewImage" style="width: 200%; height: 100%" src="../../../static/icon/1751351546444.png"></image>
			</view>
			<view class="success-title">提交成功</view>
			<view class="success-tips">请点击图片扫码添加医家养企业微信，方便后续实时掌握医生服务进度</view>
			<button class="my-record" @click="myrecord">我的申请记录</button>
			<button class="back-home" @click="backhome">返回首页</button>
		</view>

		<!-- 底部按钮 -->
		<view class="footer-box">
			<view class="footer" v-show="steps === 0">
				<button class="footerbtn" @click="submit">下一步</button>
			</view>
			<!-- footerThree -->
			<view class="footerThree" v-show="steps === 1">
				<button class="footerbtn" @click="steps = 0">上一步</button>
			</view>
			<view class="footerTwo" v-show="steps === 1">
				<button class="footerbtn" @click="submit">下一步</button>
			</view>
		</view>
		<!-- 日期选择 -->
		<u-datetime-picker ref="datetimePicker" :show="showDate" v-model="ageValue" mode="date"
			:minDate="-2920901760000" @cancel="cancel1" @confirm="confirm1" :formatter="formatter"></u-datetime-picker>

		<u-modal :show="showNoticeModal" title="患者须知" confirmText="我已了解" @confirm="closeNoticeModal">
			<view style="height: 500rpx; font-size: 18px; letter-spacing: 3px; line-height: 30px">
				<scroll-view scroll-y="true" style="height: 500rpx">
					<view>
						<p style="text-indent: 2em">
							亲爱的患者，家庭病床服务是为常年不能间断治疗的慢性重症患者，或因疾病需要长期卧床或身体衰弱、生活不能自理，且诊断明确、病情稳定、符合住院条件、经签约机构评估后在适合的家庭条件下医护人员定期上门系统治疗、护理和康复的患者提供的一种便捷的医疗卫生服务形式。我们可为您提供以下医疗服务：
						</p>
						<p style="font-weight: bold">诊疗服务：</p>
						<p>
							1.换药；
							<br />
							2.褥疮及外伤护理；
							<br />
							3.PICC置管护理;
							<br />
							4.导尿；
							<br />
							5.胃管置入；
							<br />
							6.吸氧；
							<br />
							7.康复指导；
							<br />
							8.护理指导。
						</p>
						<p style="font-weight: bold">中医药及中医适宜技术服务：</p>
						<p>
							1.中药；
							<br />
							2.中药调剂；
							<br />
							3.剂煎煮；
							<br />
							4.毫针技术；
							<br />
							5.艾灸；
							<br />
							6.拔罐；
							<br />
							7.推拿；
							<br />
							8.理疗；
							<br />
							9.耳穴；
							<br />
							10.其他中医适宜技术服务。
						</p>
					</view>
				</scroll-view>
			</view>
		</u-modal>
		
		
		
		<u-modal :show="noticeModal" title="请须知" confirmText="我已了解" @confirm="closeNoticeModal1">
			<view style="height: 500rpx; font-size: 18px; letter-spacing: 3px; line-height: 30px">
				<scroll-view scroll-y="true" style="height: 500rpx">
					<view>
						<view class="successd">
							<image  @click="previewImage" style="width: 100%; height: 100%" src="../../../static/icon/1751351546444.png"></image>
						</view>
						<view class="success-tips">请点击图片扫码添加医家养企业微信，方便后续实时掌握医生服务进度</view>
					</view>
				</scroll-view>
			</view>
		</u-modal>
	</view>
</template>

<script>
import { getagency, applicationsickbed, patientInfo, submitAgain, getHospitalList, getDepartmentList, queryPatientByZhy, queryAllRegion } from '@/api/feixiang/application.js';
import { idCardReg, mobileReg } from '@/utils/reg.js';
import { imageUrl, baseUrl } from '@/config.js';
export default {
	data() {
		return {
			// 当前显示的小图地址（本地示例，需替换为实际图片路径）
			currentImage: 'https://applet.youtuyiliao.com/profile/upload/xiaochengxu/static/9b551a2e39963cfd7af6f2975e927bf.jpg',
			      // 预览时使用的大图地址列表（可多个图片预览）
			imageList: ['https://applet.youtuyiliao.com/profile/upload/xiaochengxu/static/9b551a2e39963cfd7af6f2975e927bf.jpg'],
			showNoticeModal: false,
			noticeModal: false,
			showDate: false,
			address: '陕西省-西安市-莲湖区', //家庭住址
			searchWord: '',
			region: '',
			dateValue: '',
			ageValue: Number(new Date(1949, 9, 1)),
			userInfo: {},
			model1: {
				//表单数据
				userInfo: {
					patientName: '', //患者姓名
					patientGender: '', //性别
					patientAge: '', //年龄
					participationStatus: '', //参保情况
					medicalNumber: '', //医保类型
					idCradNumber: '', //身份证号
					personName: '', //联系人
					personPhone: '', //联系人电话
					province: '陕西省', //省
					city: '西安市', //市
					county: '莲湖区', //县
					address: '陕西省-西安市-莲湖区', //表单验证用
					homeAddress: '', //详细地址
					identity: '', //个人身份
					ifHospital: '0', //是否是医院转出
					isrolloutHospitalDepartment: '', //是否是医院转出
					applyName: '', //申请人
					relation: '', //申请人与患者关系
					applyDate: '', //申请日期
					agencyId: '', //选择的机构id
					hospitalRollOut: '', //是否医院转出
					// 医院对象
					bedHospitalVo: {
						depict: '', //病情描述
						result: '', //诊断结果
						medicalAdvice: '', //医嘱
						// 医保图片
						yibaoImage: '',
						// 病例图片多个,号拼接
						casesImage: '',
						// 医院id
						hospitlId: '',
						// 部门id
						departmentId: ''
					}
				}
			},
			actions: [
				//性别选择
				{
					name: '男'
				},
				{
					name: '女'
				}
			],
			actionsParticipationStatus: [
				//选择参保情况
				{
					name: '参保'
				},
				{
					name: '自费'
				}
			],
			yibaoList: [
				{
					name: '城镇职工基本医疗保险'
				},
				{
					name: '城镇居民基本医疗保险'
				}
			],
			actionsIdentitynNumber: [
				//个人身份
				{
					name: '军人'
				},
				{
					name: '教师'
				},
				{
					name: '程序员'
				},
				{
					name: '医生'
				},
				{
					name: '其他'
				}
			],
			isHospitalRollout: [
				//是否是医院转出
				{
					name: '是'
				},
				{
					name: '否'
				}
			],
			rolloutHospitalDepartment: [
				//转出医院及科室
				{
					name: '安医大二附院'
				},
				{
					name: '合肥中医院'
				}
			],
			actionsRelationship: [
				//申请人与患者关系
				{
					name: '本人'
				},
				{
					name: '父亲'
				},
				{
					name: '母亲'
				},
				{
					name: '丈夫'
				},
				{
					name: '妻子'
				},
				{
					name: '爷爷'
				},
				{
					name: '奶奶'
				},
				{
					name: '兄弟'
				}
			],
			showSex: false, //性别选择器显隐
			showParticipationStatus: false, //性别选择器显隐
			showPersonalIdentity: false, //个人身份选择器显隐
			showRelationship: false, //个人身份选择器显隐
			showHospitalRollout: false, //是否是医院转出选择器显隐
			showrolloutHospitalDepartment: false, //转出医院及科室选择器显隐
			timeshow: false, //申请日期选择器显隐
			yibaoshow: false,
			rules: {
				//表单验证
				'userInfo.patientName': {
					type: 'string',
					required: true,
					message: '请输入患者姓名',
					trigger: ['blur', 'change']
				},
				'userInfo.patientGender': {
					type: 'string',
					required: true,
					message: '请选择性别',
					trigger: ['blur', 'change']
				},
				'userInfo.patientAge': {
					type: 'string',
					required: true,
					message: '请输入年龄',
					trigger: ['blur', 'change']
				},
				'userInfo.participationStatus': {
					type: 'string',
					required: true,
					message: '请选择参保情况',
					trigger: ['blur', 'change']
				},

				'userInfo.idCradNumber': {
					type: 'string',
					required: true,
					message: '请输入身份证号',
					trigger: ['blur', 'change']
				},
				'userInfo.personName': {
					type: 'string',
					required: true,
					message: '请输入联系人姓名',
					trigger: ['blur', 'change']
				},
				'userInfo.personPhone': {
					type: 'string',
					required: true,
					message: '请输入联系人电话',
					trigger: ['blur', 'change']
				},
				'userInfo.address': {
					type: 'string',
					required: true,
					message: '请选择家庭住址',
					trigger: ['blur', 'change']
				},
				'userInfo.homeAddress': {
					type: 'string',
					required: true,
					message: '请输入家庭详细地址',
					trigger: ['blur', 'change']
				},
				'userInfo.hospitalRollOut': {
					type: 'string',
					required: true,
					message: '请选择是否是医院转出',
					trigger: ['blur', 'change']
				},
				// 'userInfo.identity': {
				// 					type: 'string',
				// 					required: true,
				// 					message: '请选择个人身份',
				// 					trigger: ['blur', 'change']
				// 				},
				'userInfo.bedHospitalVo.departmentId': {
					type: 'string',
					required: true,
					message: '请选择转出医院及科室',
					trigger: ['blur', 'change']
				},
				'userInfo.isHospitalRollout': {
					type: 'string',
					required: true,
					message: '请选择是否是医院转出',
					trigger: ['blur', 'change']
				},
				'userInfo.Description': {
					type: 'string',
					required: true,
					message: '请输入病情描述',
					trigger: ['blur', 'change']
				},
				'userInfo.diagnosticResults': {
					type: 'string',
					required: true,
					message: '请输入诊断结果',
					trigger: ['blur', 'change']
				},
				'userInfo.doctorsAdvice': {
					type: 'string',
					required: true,
					message: '请输入医嘱',
					trigger: ['blur', 'change']
				},
				'userInfo.applyName': {
					type: 'string',
					required: true,
					message: '请输入申请人',
					trigger: ['blur', 'change']
				},
				'userInfo.relation': {
					type: 'string',
					required: true,
					message: '请选择与患者关系',
					trigger: ['blur', 'change']
				},
				'userInfo.applyDate': {
					type: 'string',
					required: true,
					message: '请选择申请日期',
					trigger: ['blur', 'change']
				}
			},
			fileListhomePage: [], //医保首页照片
			fileListmedicalRecord: [], //病历照片
			showView: false,
			steps: 0, //控制步骤条流程
			list: [], //内容循环列表
			checked: '', //单选选择器
			bedId: '', //病床id
			classes: '',
			dataTree: [],
			showIfHospitalView: false, //显示是否是医院转出表单
			showHospitalNameSheet: false, //显示医院名称选择
			hospitalNameList: [], //医院名称列表
			showCaseTable: false, //病例表弹窗
			caseTableForm: {
				//是否转院
				zyh: '', //住院号
				agencyName: '', //医院名称
				idNo: '', //身份证号
				hospitalId: '', //医院id
				hospitalName: '' //医院名称
			},
			caseTableData: {},
			regionList: [],
			map: {
				text: 'regionName',
				value: 'regionName'
			},
			region: ''
		};
	},
	onReady() {
		// 微信小程序需要用此写法
		// this.$refs.datetimePicker.setFormatter(this.formatter)
	},
	onShow() { },
	onLoad(options) {
		this.region = uni.getStorageSync('region');
		this.queryAllRegion();
		this.bedId = options.bedId;
		console.log('bedId', this.bedId);
		// if(!this.bedId){
		this.showNoticeModal = true;
		this.noticeModal = true;
		// }
		this.onpopupopened();
		if (options.bedId) {
			this.initdata();
		}
		if (this.steps === 0) {
			console.log('第一步');
			this._getagency();
		}
		this.mymethod('1999-11-10');
	},
	methods: {
		 previewImage() {
		      uni.previewImage({
		        current: this.currentImage, // 当前显示图片的链接
		        urls: this.imageList,       // 需要预览的图片链接列表
		        indicator: 'default',       // 指示器样式（default默认/none无/number数字）
		        loop: true,                 // 是否循环预览
		        longPressActions: {         // 长按保存图片配置（uniapp 3.4.0+支持）
		          itemList: ['保存图片', '取消'],
		          success: function(data) {
		            console.log('选中了第' + (data.tapIndex + 1) + '个按钮');
		          }
		        }
		      });
		    },
		confirm1(val) {
			// console.log(val.value);
			let date = new Date(Number(val.value)); //时间戳为10位需*1000，时间戳为13位的话不需乘1000
			let Y = date.getFullYear() + '-';
			console.log(date);
			let M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-';
			let D = (date.getDate() < 10 ? '0' + date.getDate() : date.getDate()) + ' ';
			let h = date.getHours() + ':';
			let m = date.getMinutes() + ':';
			let s = date.getSeconds();
			let a = Y + M + D;
			// this.model1.userInfo.patientAge = Y+M+D
			this.$set(this.model1.userInfo, 'patientAge', a);
			this.showDate = false;
		},
		cancel1() {
			this.showDate = false;
		},
		search() {
			this._getagency();
		},
		// 获取机构
		async _getagency() {
			const res = await getagency({
				name: this.searchWord,
				region: this.region
			});
			this.list = res.data;
			this.list.forEach((item) => {
				// 图片路劲拼接
				item.thumbnail = baseUrl + item.thumbnail;
			});
		},
		async initdata() {
			const res = await patientInfo(this.bedId);
			this.model1.userInfo = {
				...res.data.bed
			};
			this.model1.userInfo.bedHospitalVo = res.data.bedHospital;
			this.model1.userInfo.address = res.data.bed.province + '-' + res.data.bed.city + '-' + res.data.bed.county;
			// console.log(this.model1.userInfo.address);
			// 年龄处理
			this.model1.userInfo.patientAge = res.data.birthday;
			// this.model1.userInfo.patientAge = newage
			// console.log(this.model1.userInfo.ifHospital, '123333');
			//是否转院处理
			if (this.model1.userInfo.hospitalRollOut === '是') {
				this.showIfHospitalView = true;
				this.caseTableForm.agencyName = this.model1.userInfo.hospitalName;
				this.caseTableForm.hospitalName = this.model1.userInfo.hospitalName;
				this.caseTableForm.hospitalId = this.model1.userInfo.hospitalId;
				this.caseTableForm.zyh = this.model1.userInfo.zyh;
			} else {
				this.showIfHospitalView = false;
			}
			if (this.model1.userInfo.ifHospital === '1') {
				//是医院转出
				this.model1.userInfo.isrolloutHospitalDepartment = '是';
				this.classes = this.model1.userInfo.bedHospitalVo.departmentId;
				this.showView = true;
				// 医保首页照片
				// console.log(this.model1.userInfo.bedHospitalVo);
				if (this.model1.userInfo.bedHospitalVo.yibaoImage) {
					const obj = {
						url: imageUrl + this.model1.userInfo.bedHospitalVo.yibaoImage
					};
					this.fileListhomePage.push(obj);
				}
				// 病历照片
				// console.log(this.model1.userInfo.bedHospitalVo, '123333');
				const arr1 = this.model1.userInfo.bedHospitalVo.casesImage.split(',');
				arr1.forEach((ele) => {
					const str = {
						url: ''
					};
					if (ele) {
						str.url = imageUrl + ele;
						this.fileListmedicalRecord.push(str);
					}
				});
			} else if (this.model1.userInfo.ifHospital === '0') {
				//不是医院转出
				this.model1.userInfo.isrolloutHospitalDepartment = '否';
			}
		},
		// 弹出层弹出式触发
		// 获取医院列表
		async onpopupopened() {
			const res = await getHospitalList();
			res.data.forEach((item) => {
				item.text = item.name;
				item.value = item.id;
				for (let i = 0; i < item.children.length; i++) {
					// console.log(item.children);
					item.children[i].text = item.children[i].name;
					item.children[i].value = item.children[i].id;
				}
			});
			this.dataTree = res.data;
		},
		// 节点被点击触发
		// 获取科室数据
		async onnodeclick(val) {
			// console.log(val, '776');
			if (val.parentId == 0) {
				//属于医院
				this.model1.userInfo.bedHospitalVo.hospitlId = val.id;
			} else {
				//属于科室
				this.model1.userInfo.bedHospitalVo.departmentId = val.id;
			}
		},
		// 医院科室弹窗关闭时触发
		onpopuplosed() {
			this.dataTree = [];
		},
		// 表单数据提交
		async submit() {
			if (this.steps > 0) {
				// 表单校验
				const verification = await this.$refs.formdata.validate();
				// console.log(this.model1.userInfo.ifHospital);
				if (this.model1.userInfo.participationStatus == '参保') {
					if (!this.model1.userInfo.medicalNumber) {
						uni.$u.toast('请输入医保类型');
						return;
					}
				}
				if (!idCardReg.test(this.model1.userInfo.idCradNumber)) {
					uni.$u.toast('请输入正确的身份证号');
					return;
				}
				if (!mobileReg.test(this.model1.userInfo.personPhone)) {
					uni.$u.toast('请输入正确的手机号码');
					return;
				}
				if (this.model1.userInfo.hospitalRollOut == '是') {
					console.log(this.caseTableForm);
					if (!this.caseTableForm.agencyName) {
						uni.$u.toast('请选择医院名称');
						return;
					}
					if (!this.caseTableForm.zyh) {
						uni.$u.toast('请输入住院编号');
						return;
					}
				}
			}

			// console.log(this.model1.userInfo.ifHospital);
			// if(this.model1.userInfo.ifHospital == 1){
			// 	console.log(this.model1.userInfo);
			// 	if(!this.model1.userInfo.bedHospitalVo.departmentId) {
			// 		uni.$u.toast("请选择转出医院科室")
			// 		return
			// 	}
			// }

			// 	if(!this.model1.userInfo.bedHospitalVo.depict) {
			// 		uni.$u.toast("请输入病情描述")
			// 		return
			// 	}
			// 	if(!this.model1.userInfo.bedHospitalVo.result) {
			// 		uni.$u.toast("请输入诊断结果")
			// 		return
			// 	}
			// 	if(!this.model1.userInfo.bedHospitalVo.medicalAdvice) {
			// 		uni.$u.toast("请输入医嘱")
			// 		return
			// 	}
			// 	if(!this.model1.userInfo.bedHospitalVo.yibaoImage) {
			// 		uni.$u.toast("请上传医保首页照片")
			// 		return
			// 	}
			// 	if(!this.model1.userInfo.bedHospitalVo.casesImage) {
			// 		uni.$u.toast("请上传病历照片")
			// 		return
			// 	}
			// }

			uni.pageScrollTo({
				scrollTop: 0,
				duration: 150
			});
			// 如果表单发送成功
			// 改变步骤条状态
			if (this.steps === 1) {
				if (this.showIfHospitalView) {
					//this.showCaseTable = true
				} else {
					this.caseTableDataClose();
				}
				console.log(this.model1.userInfo.agencyId);
				if (this.model1.userInfo.agencyId) {
					if (this.bedId) {
						//有id就走修改逻辑
						// this.model1.userInfo.patientAge = birthday
						const param = Object.assign({}, this.model1.userInfo);
						param.hospitalName = this.caseTableForm.agencyName;
						param.hospitalId = this.caseTableForm.hospitalId;
						param.zyh = this.caseTableForm.zyh;
						const res3 = await submitAgain(param);
						console.log(res3.code);
						if (res3.code === 200) {
							this.steps = 2;
							this.noticeModal = true;
						} else {
							uni.showToast({
								title: '出错啦',
								icon: 'error'
							});
						}
					} else {
						//没有bedid就是添加
						// console.log(this.model1.userInfo);
						const param = Object.assign({}, this.model1.userInfo);
						param.hospitalName = this.caseTableForm.hospitalName;
						param.hospitalId = this.caseTableForm.hospitalId;
						param.zyh = this.caseTableForm.zyh;

						const res2 = await applicationsickbed(param);
						if (res2.code === 200) {
							this.steps = 2;
						} else {
							uni.showToast({
								title: '出错啦',
								icon: 'error'
							});
						}
					}
				}
				//---------------------
				// this.steps = 1
				// const res= await getagency({
				// 	name:''
				// })
				// this.list = res.data
				// this.list.forEach(item => {
				// 	// 图片路劲拼接
				// 	item.thumbnail = imageUrl + item.thumbnail

				// 	if(item.agencyId === this.model1.userInfo.agencyId) {
				// 		console.log(item.agencyId);
				// 		this.checked = item.agencyId
				// 	}
				// })
				//--------------------

				// console.log(this.list);
				// this.list.forEach(item => {

				// })
				// console.log(this.model1.userInfo);
			} else if (this.steps === 0) {
				// 判断是否选择了机构
				if (!this.model1.userInfo.agencyId) {
					uni.showToast({
						title: '请选择机构',
						icon: 'error'
					});
				} else {
					this.steps = 1;
				}
			} else if (this.steps === 2) {
				this.steps = 0;
			}

			// console.log(this.steps);
		},
		// 性别选择器
		sexSelect(e) {
			this.model1.userInfo.patientGender = e.name;
			// this.$refs.form1.validateField('userInfo.sex')
		},
		// 参保情况选择器
		participationStatusSelect(e) {
			this.model1.userInfo.participationStatus = e.name;
			// this.$refs.form1.validateField('userInfo.sex')
		},
		// 个人身份选择器
		personalIdentitySelect(e) {
			this.model1.userInfo.identity = e.name;
			// this.$refs.form1.validateField('userInfo.sex')
		},
		// 是否是医院转出选择器
		HospitalRolloutSelect(e) {
			if (e.name === '是') {
				this.showView = true;
				this.model1.userInfo.ifHospital = 1;
			} else {
				this.showView = false;
				this.model1.userInfo.ifHospital = 0;
				this.model1.userInfo.bedHospitalVo = {
					depict: '', //病情描述
					result: '', //诊断结果
					medicalAdvice: '', //医嘱
					// 医保图片
					yibaoImage: '',
					// 病例图片多个,号拼接
					casesImage: '',
					// 医院id
					hospitlId: '',
					// 部门id
					departmentId: ''
				};
			}
			this.model1.userInfo.isrolloutHospitalDepartment = e.name;
		},
		pickerclear() {
			this.model1.userInfo.bedHospitalVo.departmentId = '';
		},
		yibaoSelect(e) {
			this.model1.userInfo.medicalNumber = e.name;
		},
		// // 转出医院及科室
		// rolloutHospitalDepartmentSelect(e) {
		// 	this.model1.userInfo.rolloutHospitalDepartment = e.name
		// },
		// 申请人与患者关系选择器
		relationshipSelect(e) {
			this.model1.userInfo.relation = e.name;
			// this.$refs.form1.validateField('userInfo.sex')
		},
		// 省市县选择器
		addressfn(e) {
			// console.log(e.detail.value);
			// 省
			this.model1.userInfo.province = e.detail.value[0];
			// 市
			this.model1.userInfo.city = e.detail.value[1];
			// 县
			this.model1.userInfo.county = e.detail.value[2];
			this.address = e.detail.value.join('-');
			this.model1.userInfo.address = e.detail.value.join('-');
		},
		// 日期选择器
		bindDateChange(e) {
			console.log(e.detail.value);
			// this.model1.userInfo.applyDate = e.detail.value
			this.$set(this.model1.userInfo, 'applyDate', e.detail.value);
		},
		// 跳转到对应的机构详情
		institutiondetailsfn(val) {
			uni.navigateTo({
				url: `/sickbed/pages/feixiang/institution-details/institution-details?agencyId=${val.agencyId}`
			});
		},
		// 单选框选择处理
		rediofn(val) {
			console.log(val, '996');
			this.checked = val;
			this.model1.userInfo.agencyId = val;
		},
		// 跳转到我的申请记录
		myrecord() {
			uni.reLaunch({
				url: '/sickbed/pages/feixiang/application-record/application-record'
			});
		},
		// 返回首页
		backhome() {
			uni.reLaunch({
				url: '/pages/index/index'
			});
		},
		// 选择图片后触发
		async afterRead1(event) {
			// 当设置 mutiple 为 true 时, file 为数组格式，否则为对象格式
			let lists = [].concat(event.file);
			// this.model1.userInfo.yibaoImage
			// this.model1.userInfo.casesImage
			let fileListLen = this[`fileListhomePage`].length;
			lists.map((item) => {
				this[`fileListhomePage`].push({
					...item,
					message: '上传中'
				});
			});
			for (let i = 0; i < lists.length; i++) {
				const result = await this.uploadFilePromise(lists[i].url);
				let item = this[`fileListhomePage`][fileListLen];
				this[`fileListhomePage`].splice(
					fileListLen,
					1,
					Object.assign(item, {
						status: 'success',
						message: '',
						url: result
					})
				);
				fileListLen++;
			}
		},
		// 选择图片后触发
		async afterRead2(event) {
			// 当设置 mutiple 为 true 时, file 为数组格式，否则为对象格式
			let lists = [].concat(event.file);
			let fileListLen = this[`fileListmedicalRecord`].length;
			lists.map((item) => {
				console.log(item);
				this[`fileListmedicalRecord`].push({
					...item,
					message: '上传中'
				});
			});
			for (let i = 0; i < lists.length; i++) {
				const result = await this.uploadFilePromise2(lists[i].url);
				let item = this[`fileListmedicalRecord`][fileListLen];
				console.log(item);
				this[`fileListmedicalRecord`].splice(
					fileListLen,
					1,
					Object.assign(item, {
						status: 'success',
						message: '',
						url: result
					})
				);
				fileListLen++;
			}
		},
		// 删除选择的图片
		deletePic1(event) {
			this[`fileListhomePage`].splice(event.index, 1);
		},
		// 删除选择的图片
		deletePic2(event) {
			this[`fileListmedicalRecord`].splice(event.index, 1);
		},
		// 医保首页照片上传
		uploadFilePromise(url) {
			return new Promise((resolve, reject) => {
				let a = uni.uploadFile({
					url: 'https://applet.youtuyiliao.com/upload/public/uploadImage', // 仅为示例，非真实的接口地址
					filePath: url,
					name: 'file',
					formData: {
						user: 'test'
					},
					success: (res) => {
						this.model1.userInfo.bedHospitalVo.yibaoImage = JSON.parse(res.data).data;
					}
				});
			});
		},
		// 病历照片上传
		uploadFilePromise2(url) {
			return new Promise((resolve, reject) => {
				let a = uni.uploadFile({
					url: 'https://applet.youtuyiliao.com/upload/public/uploadImage', // 仅为示例，非真实的接口地址
					filePath: url,
					name: 'file',
					formData: {
						user: 'test'
					},
					success: (res) => {
						// JSON.parse(res.data).data
						const str = JSON.parse(res.data).data;
						this.model1.userInfo.bedHospitalVo.casesImage = this.model1.userInfo.bedHospitalVo.casesImage + str + ',';
						// console.log(this.model1.userInfo.bedHospitalVo);
					}
				});
			});
		},
		mymethod(birthday) {
			//根据日期算年龄
			if (birthday) {
				birthday = birthday.split('-');
				// 新建日期对象
				let date = new Date();
				// 今天日期，数组，同 birthday
				let today = [date.getFullYear(), date.getMonth() + 1, date.getDate()];
				// 分别计算年月日差值
				let age = today.map((val, index) => {
					return val - birthday[index];
				});
				// 当天数为负数时，月减 1，天数加上月总天数
				if (age[2] < 0) {
					// 简单获取上个月总天数的方法，不会错
					let lastMonth = new Date(today[0], today[1], 0);
					age[1]--;
					age[2] += lastMonth.getDate();
				}
				// 当月数为负数时，年减 1，月数加上 12
				if (age[1] < 0) {
					age[0]--;
					age[1] += 12;
				}
				// console.log(age[0]+'岁'+age[1]+'月'+age[2]+'天');
				return age[0];
			}
		},
		ifHospitalSelect(e) {
			console.log(e);
			if (e.name === '是') {
				this.showIfHospitalView = true;
				// this.model1.userInfo.ifHospital = 1
			} else {
				this.showIfHospitalView = false;
				// this.model1.userInfo.ifHospital == 0
			}
			this.model1.userInfo.hospitalRollOut = e.name;
		},
		showHospitalNameSheetView() {
			this.showHospitalNameSheet = true;
			this.getHospitalNameList();
		},
		async getHospitalNameList() {
			const res = await getHospitalList();
			console.log(res);
			this.hospitalNameList = res.data.map((item) => {
				return {
					name: item.name,
					id: item.id
				};
			});
		},
		hospitalNameSelect(e) {
			console.log(e);
			this.caseTableForm.agencyName = e.name;
			this.caseTableForm.hospitalId = e.id;
			this.caseTableForm.hospitalName = e.name;
		},
		async caseTableDataOpen() {
			console.log('bedId', this.model1.userInfo.patientAge);
			const param = Object.assign({}, this.caseTableForm);
			param.idNo = this.model1.userInfo.idCradNumber;
			const res = await queryPatientByZhy(param);
			console.log(res);
			this.caseTableData = res.data;
			this.model1.userInfo.patientName = res.data.name;
			this.model1.userInfo.patientGender = res.data.sex;
			this.model1.userInfo.idCradNumber = res.data.idNo;
			let IdCard = res.data.idNo;
			let birthday = IdCard.substring(6, 10) + '-' + IdCard.substring(10, 12) + '-' + IdCard.substring(12, 14);
			this.model1.userInfo.patientAge = birthday;
		},
		async caseTableDataClose() {
			this.showCaseTable = false;
			this.steps = 1;
			const res = await getagency({
				name: ''
			});
			this.list = res.data;
			this.list.forEach((item) => {
				// 图片路劲拼接
				item.thumbnail = imageUrl + item.thumbnail;
				if (item.agencyId === this.model1.userInfo.agencyId) {
					console.log(item.agencyId);
					this.checked = item.agencyId;
				}
			});
		},
		closeNoticeModal() {
			this.showNoticeModal = false;
		},
		closeNoticeModal1() {
			this.noticeModal = false;
		},
		async queryAllRegion() {
			const res = await queryAllRegion({});
			this.regionList = res.data;
		}
	}
};
</script>

<style scoped>
	.container {
	  width: 100%;
	  height: 100vh;
	  display: flex;
	  justify-content: center;
	  align-items: center;
	  background-color: #f8f8f8;
	  }
	  .thumbnail-image {
	    width: 80%;  // 宽度可根据需求调整
	    height: 400rpx;
	    border-radius: 16rpx;
	    box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.1);
	  }
	
>>>.item-right-text-address-text {
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
	width: 360rpx;
}

/* 步骤条样式修改 */
>>>.u-steps-item__wrapper {
	background-color: #00bcb2;
}

>>>.u-steps-item__wrapper__circle {
	/* background-color: #b4d9fe!important; */
	border-style: none;
	border-color: #00bcb2 !important;
}

>>>.u-steps-item__wrapper__circle__text {
	color: #00bcb2 !important;
}

>>>.u-steps-item__line--row {
	display: none;
}

>>>.u-text__value--main {
	color: #fff;
}

>>>.u-text__value--content {
	color: rgba(255, 255, 255, 0.7);
}

>>>.u-text__value {
	color: rgba(255, 255, 255, 0.7) !important;
}

>>>.u-form-item__body__right__message {
	margin-left: 0 !important;
}

>>>.Description>.u-form-item__body>.u-form-item__body__right>.u-form-item__body__right__content>.u-form-item__body__right__content__slot {
	flex-direction: column !important;
	align-items: flex-start;
}

>>>.diagnosticResults>.u-form-item__body>.u-form-item__body__right>.u-form-item__body__right__content>.u-form-item__body__right__content__slot {
	flex-direction: column !important;
	align-items: flex-start;
}

>>>.doctorsAdvice>.u-form-item__body>.u-form-item__body__right>.u-form-item__body__right__content>.u-form-item__body__right__content__slot {
	flex-direction: column !important;
	align-items: flex-start;
}

>>>.homePage>.u-form-item__body>.u-form-item__body__right>.u-form-item__body__right__content>.u-form-item__body__right__content__slot {
	flex-direction: column !important;
	align-items: flex-start;
}

>>>.medicalRecord>.u-form-item__body>.u-form-item__body__right>.u-form-item__body__right__content>.u-form-item__body__right__content__slot {
	flex-direction: column !important;
	align-items: flex-start;
}

>>>.u-upload__success {
	display: none !important;
}

>>>.u-upload__wrap__preview {
	margin: 16rpx 16rpx 0 0;
}

>>>.u-upload__wrap {
	align-items: center;
}

>>>.uni-data-tree-input {
	width: 400rpx;
	margin-left: 200rpx;
}

.slots {
	color: #00bcb2;
	width: 42rpx;
	height: 42rpx;
	line-height: 42rpx;
	text-align: center;
	border-radius: 200rpx;
	background-color: rgba(255, 255, 255, 0.7);
}

.slot-icon {
	width: 48rpx;
	height: 48rpx;
	color: #00bcb2;
	text-align: center;
	border-radius: 50%;
	background-color: rgba(255, 255, 255, 0.7);
	line-height: 48rpx;
}

.slot-acticed {
	background-color: rgba(255, 255, 255, 1) !important;
}

.slots-activited {
	color: #00bcb2;
	width: 42rpx;
	height: 42rpx;
	line-height: 42rpx;
	text-align: center;
	border-radius: 200rpx;
	background-color: #fff;
}

.tepsicon {
	/* width: 10px;
	height: 10px; */
}

>>>.u-steps-item__wrapper {
	background-color: #00bcb2 !important;
}

>>>.u-text__value--main {
	color: #fff !important;
}

/* >>> .u-text__value {
		color: #b4d9fe!important;
	} */
/* 日期选择器样式修改 */
uni-picker {
	width: 100%;
	margin-left: 40rpx;
}

.header {
	height: 176rpx;
	background-color: #00bcb2;
	padding-top: 40rpx;
}

.body {
	padding: 0 32rpx 146rpx 32rpx;
	background-color: #fff;
}

/* 选择机构 */
.body-mechanism {
	padding: 40rpx 32rpx 150rpx 32rpx;
	background-color: #f8f6f9;
}

/* 搜索框样式 */
>>>.u-search {
	background-color: #fff !important;
	border-radius: 16rpx !important;
}

>>>.u-search__content {
	background-color: #fff !important;
}

>>>.u-search__content__input {
	background-color: #fff !important;
}

>>>.u-search__action {
	color: #00bcb2;
	border-left: 2rpx solid #e4e1e1;
}

.body-content {
	/* height: 200px; */
	background-color: #fff;
	margin-top: 32rpx;
	border-radius: 16rpx;
}

.body-content-items {
	/* height: 204rpx; */
	display: flex;
	padding: 0 28rpx;
	padding-bottom: 10rpx;
}

.item-left {
	width: 40rpx;
	height: 40rpx;
	border-radius: 50%;
	margin-right: 24rpx;
	margin-top: 102rpx;
	transform: translateY(-50%);
}

.item-right {
	/* height: 204rpx; */
	flex: 1;
	border-bottom: 4rpx solid #f7f7f7;
	padding-top: 32rpx;
	display: flex;
	position: relative;
}

.item-right-img {
	width: 140rpx;
	height: 140rpx;
	border-radius: 16rpx;
	background-color: #fff;
}

.item-right-text {
	/* height: 140rpx; */
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	margin-left: 20rpx;
}

.item-right-text-title {
	width: 400rpx;
	font-size: 32rpx;
	font-weight: 600;
}

.item-right-text-address {
	font-size: 28rpx;
	color: #777777;
	height: 40rpx;
	display: flex;
}

.item-right-text-info {
	font-size: 28rpx;
	color: #777777;
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
	width: 390rpx;
}

.addressicon {
	display: inline-block;
	width: 40rpx;
	height: 40rpx;
	margin-right: 4rpx;
}

.item-right-icon {
	width: 32rpx;
	height: 32rpx;
	position: absolute;
	top: 32rpx;
	right: 0;
}

/* 等待结果 */
.body-result {
	padding: 0 52rpx;
	display: flex;
	flex-direction: column;
	align-items: center;
}

.successicon {
	width: 160rpx;
	height: 160rpx;
	margin-top: 160rpx;
	margin-bottom: 32rpx;
}

.successd {
	width: 160rpx;
	display: flex;
	height: 160rpx;
	margin-top: 160rpx;
	margin-bottom: 32rpx;
}

.success-title {
	font-size: 36rpx;
	font-weight: 600;
	margin-bottom: 8rpx;
}

.success-tips {
	font-size: 32rpx;
	color: #777;
	margin-bottom: 200rpx;
}

.my-record {
	background-color: #00bcb2;
	color: #fff;
	height: 96rpx;
	line-height: 96rpx;
	width: 100%;
	border-radius: 48rpx;
	margin-bottom: 52rpx;
}

.back-home {
	background-color: #fff;
	color: #00bcb2;
	border: 2rpx solid #00bcb2;
	height: 96rpx;
	line-height: 96rpx;
	width: 100%;
	border-radius: 48rpx;
}

/* 底部提交按钮样式 */
.footer-box {
	width: 100%;
	background-color: #f8f6f9;
	position: fixed;
	bottom: 0;
	display: flex;
	justify-content: space-between;
}

.footer {
	width: 100%;
	padding: 0 32rpx;
	background-color: #fff;
	padding-bottom: 48rpx;
	/* 微信小程序需要提高优先级显示才会正常 */
	z-index: 999999;
}

.footerTwo {
	width: 46%;
	padding: 0 32rpx;
	background-color: #f8f6f9;
	padding-bottom: 48rpx;
	/* 微信小程序需要提高优先级显示才会正常 */
	z-index: 999999;
}

.footerThree {
	width: 46%;
	padding: 0 32rpx;
	background-color: #f8f6f9;
	padding-bottom: 48rpx;
	/* 微信小程序需要提高优先级显示才会正常 */
	z-index: 999999;
}

.footerbtn {
	border-radius: 60rpx;
	height: 96rpx;
	line-height: 96rpx;
	color: #fff;
	background-color: #00bcb2;
	/* 微信小程序需要提高优先级显示才会正常 */
	z-index: 999999;
}

/* 下拉选择框样式 */
>>>.u-action-sheet {
	padding: 0 32rpx;
}

>>>.u-form-item__body__left__content__label {
	width: 240rpx;
}

.case-table-view {
	width: 100%;
	display: flex;
	flex-direction: column;
}

.case-table-title {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #00bcb2;
	color: white;
	border-top-left-radius: 10px;
	border-top-right-radius: 10px;
	padding: 10px;
}

.case-table-body {
	padding: 10px;
}

.case-table-footer {
	padding: 10px;
}
</style>
